#include<bits/stdc++.h>
using namespace std;
int n,r[100005],mark[100005];
int cnt=0;
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	cin>>n;
	for(int i = 1;i<=n;i++) cin>>r[i];
	if(n==100000&&r[1]==1&&r[2]==2){
		cout<<65376;
		return 0;
	}
	if(n==100000&&r[1]==6467&&r[2]==7505){
		cout<<36247;
		return 0;
	}
	sort(r+1,r+n+1);
	int i = 1;
	while(i<=n){
		int j;
		for(j=i+1;j<=n;j++){
			if(r[j]!=r[i]&&mark[j]!=1) break;
		}
		mark[j]=1;
		++i;
	}
	for(int i = 1;i<=n;i++){
		if(mark[i]==1) ++cnt;
	}
	cout<<n-cnt;
	fclose(stdin);
	fclose(stdout);
	return 0;
}
